100 CLS:PRINT "CHECK FOR PROPER ASCENDING LINE NUMBERS IN BASIC PROGRAM -":PRINT
110 INPUT "FILE NAME (assumes .BAS extension) ";F$
120 PRINT:IF F$="" THEN END
130 PRINT "HIT ESCAPE TO QUIT WHILE IN PROGRESS":PRINT
140 F$=F$+".BAS":OPEN F$ FOR INPUT AS #1
150 REM
160 IF EOF(1) THEN CLOSE:PRINT:PRINT:PRINT "CHECK COMPLETE":END
170   LINE INPUT #1,I$
180   PRINT I$
190   OLD=CUR
200   FOR A=1 TO 6
210     IF MID$(I$,A,1)=" " THEN I$=LEFT$(I$,A-1):GOTO 230
220   NEXT A
230   CUR=VAL(I$)
240   IF CUR>OLD THEN 280
250   PRINT:PRINT "out of order?   previous:";OLD;"  current:";CUR;"   hit any key...":PRINT
260   IN$=INKEY$:IF IN$="" THEN 260
270 GOTO 160
280 IN$=INKEY$:IF IN$="" THEN 160
290 IF IN$=CHR$(27) THEN CLOSE:PRINT:PRINT:PRINT "TERMINATED":END
300 GOTO 160

